package cn.teduymdj.jxc.service.impl;

import cn.teduymdj.jxc.mapper.LogMapper;
import cn.teduymdj.jxc.pojo.dto.LogAddNewDTO;
import cn.teduymdj.jxc.pojo.dto.LogSelectConditionDTO;
import cn.teduymdj.jxc.pojo.entity.Log;
import cn.teduymdj.jxc.pojo.vo.LogListItemVO;
import cn.teduymdj.jxc.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class LogServiceImpl implements LogService {
    @Autowired
    LogMapper mapper;
    @Override
    public void save(LogAddNewDTO log) {
        mapper.insert(log);
    }

    @Override
    public List<LogListItemVO> getLogList(LogSelectConditionDTO logSelectConditionDTO) {
        return mapper.listByCondition(logSelectConditionDTO);
    }

    @Override
    public Long getLogCount(String type, String trueName, LocalDateTime sTime, LocalDateTime eTime) {
        return null;
    }
}
